<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<%@ include file="/WEB-INF/views/include/header.jsp"%>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>文件上传控件 <small>https://github.com/kartik-v/bootstrap-fileinput</small></h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="font-noraml">简单示例</label>
                            <div class="file-loading">
                                <input class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="font-noraml">多文件上传</label>
                            <div class="file-loading">
                                <input id="fileinput-demo-1" type="file" name="file" multiple>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label class="font-noraml">相关参数详细信息</label>
                            <div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

	</div>
    <%@ include file="/WEB-INF/views/include/footer.jsp"%>
    <script type="text/javascript">
		var prefix = ctx + "tool/upload"
		$("#form-uploadFile-add").validate({
			rules:{
				file:{
					required:true,
				},
			}
		});

        $(document).ready(function () {
            $("#fileinput-demo-1").fileinput({
                'theme': 'explorer-fas',
                'uploadUrl': prefix + "/uploadFileForMd",
                overwriteInitial: false,
                initialPreviewAsData: true
            });
        });

		
		function submitHandler() {
		    alert(22);
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/uploadFileForMd", $('#form-uploadFile-add').serialize());
	        }
	    }
	</script>
</body>
</html>
